﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="register.aspx.cs" Inherits="UFSSWebApp.register" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>UFSS File Sharing System</title>
		<meta http-equiv="content-type" content="text/html;charset=utf-8" />
		<link rel="stylesheet" type="text/css" href="~/styles/main.css" />

</head>
<body>
    <form id="form1" runat="server" >
    <div>
    <span class="titleSpan">UFSS</span>

		<span class="subtitleSpan"> // Registration</span>
		<hr />
		    </div>
			<div class="centerBox" align="center">
				<h2>Creating your new account</h2>
					<table><tbody>

					<tr><td align="right">
					First name:
					</td><td>
						&nbsp;<asp:TextBox ID="txtFirstname" runat="server"></asp:TextBox>
					</td><td align="left" valign="middle">
						
					</td></tr>
					<tr><td align="right">
					Last name:
					</td><td align="left">
						&nbsp;<asp:TextBox ID="txtLastname" runat="server"></asp:TextBox>

					</td><td align="left" valign="middle">
						
					</td></tr>
					<tr><td align="right" valign="middle">
					    <br />
					Username:
					</td><td><hr />
						&nbsp;<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>
                        &nbsp;</td><td align="left" valign="middle">
						    <br />
						    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="txtUsername" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </td></tr>

					<tr><td align="right">
					Password:
					</td><td>
						&nbsp;<asp:TextBox ID="txtPassword1" runat="server" TextMode="Password"></asp:TextBox>
					</td><td align="left" valign="middle">
						    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                                ControlToValidate="txtPassword1" ErrorMessage="*"></asp:RequiredFieldValidator>
					</td></tr>
					<tr><td align="right">
					Re-enter password:
					</td><td>

						&nbsp;<asp:TextBox ID="txtPassword2" runat="server" TextMode="Password"></asp:TextBox>
					</td><td align="left" valign="middle">
						    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                                ControlToValidate="txtPassword2" ErrorMessage="*"></asp:RequiredFieldValidator>
                        </td></tr>
					<tr><td align="right">
					Email address:
					</td><td>
						&nbsp;<asp:TextBox ID="txtEmail1" runat="server"></asp:TextBox>
					</td><td align="left" valign="middle">

						    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                                ControlToValidate="txtEmail1" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="valEmail1" runat="server" 
                                ControlToValidate="txtEmail1" ErrorMessage="Inccorect Email Format." 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                        </td></tr>
					<tr><td align="right">
					Re-enter email:
					</td><td>
						&nbsp;<asp:TextBox ID="txtEmail2" runat="server"></asp:TextBox>
					</td><td align="left" valign="middle">
						    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                                ControlToValidate="txtEmail2" ErrorMessage="*"></asp:RequiredFieldValidator>
                            <asp:RegularExpressionValidator ID="valEmail2" runat="server" 
                                ControlToValidate="txtEmail2" ErrorMessage="Inccorect Email Format." 
                                ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                        </td></tr>
					<tr><td align="right">
					    <asp:CompareValidator ID="CompareValidator1" runat="server" 
                            ControlToCompare="txtEmail1" ControlToValidate="txtEmail2" 
                            ErrorMessage="Emails do not match."></asp:CompareValidator>
                        <br />
                        <asp:CompareValidator ID="valPass" runat="server" 
                            ControlToCompare="txtPassword1" ControlToValidate="txtPassword2" 
                            ErrorMessage="Passwords do not match."></asp:CompareValidator>
                        </td><td align="right">
						&nbsp;<button id="btnReset" type="reset" onclick="this.form.reset()">Reset</button>&nbsp;<asp:Button 
                                ID="btnRegister" runat="server" Text="Register" onclick="btnRegister_Click" />
					</td>
                    <td align="left">

                        <asp:Label ID="lblError" runat="server" ForeColor="Red" 
                            Text="Error Creating Account." Visible="False"></asp:Label>

                    </td></tr>
				</tbody></table>
                
			</div>
		</form>
    </body>
</html>
